PROGRAM MAPS
USE POLYMORPHIC_COMPLEXTAYLOR
TYPE(DAMAP) ROT,SEXT,TOTAL_DA_MAP,TOTAL_TPSA_MAP
REAL(DP) ANGLE,KICK_STRENGTH
TYPE(REAL_8) Y,X1,X2
integer mf
mf=20
open(unit=mf,file='results.txt')
CALL INIT(NO1=2,ND1=1,NP1=0,NDPT1 =0)     !   <------------------ init for maps in ND1 degrees of freedom

CALL ALLOC(ROT,SEXT,TOTAL_DA_MAP,TOTAL_TPSA_MAP)
CALL ALLOC(Y,X1,X2)

ANGLE=30.0_DP * PI/180.0_DP



Y=ANGLE 



ROT%V(1)= (COS(ANGLE).MONO.'10') + (SIN(ANGLE).MONO.'01') -1.d-1
ROT%V(2)= (COS(ANGLE).MONO.'01') - (SIN(ANGLE).MONO.'10') -2.d-1

KICK_STRENGTH=3.0_DP

SEXT%V(1)= (1.0_DP.MONO.'10') +.01d0
SEXT%V(2)= (1.0_DP.MONO.'01') + (KICK_STRENGTH.MONO.'20') +.02d0

write(20,*) " Map of Rotation "
CALL PRINT(ROT,mf)
write(20,*) " Map of Sextupole kick "
CALL PRINT(SEXT,mf)

TOTAL_DA_MAP=SEXT*ROT   ! <---- * PERFORMS A DA-CONCATENATION OF TWO DAMAPS

write(20,*) " Map for SEXT*ROT  "
CALL PRINT(TOTAL_DA_MAP,mf)

TOTAL_TPSA_MAP=SEXT.o.ROT   ! <---- * PERFORMS A TPSA-CONCATENATION OF TWO DAMAPS

write(20,*) " Map for SEXT.o.ROT  "
CALL PRINT(TOTAL_TPSA_MAP,mf)


CALL KILL(ROT,SEXT,TOTAL_DA_MAP,TOTAL_TPSA_MAP)
CALL KILL(Y,X1,X2)

close(20)
END PROGRAM MAPS

